from openpyxl import load_workbook

wb = load_workbook('test12.xlsx')
ws = wb.active
print(ws.iter_rows(min_row=1, max_row=5, min_col=2))
# print(list(ws.iter_rows(min_row=1, max_row=5, min_col=2)))
i = 1
for row in ws.iter_rows(min_row=1, max_row=5, min_col=2):
    # print(row)
    for col in row:
        # print(col)
        # 修改值
        print(col.value)
        # 获取值
        col.value = col.value + str(i)
    i += 1

